package com.tianql.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Component
@ConfigurationProperties(prefix = "my.dog")
@Data
public class DogConfig implements Serializable{
    private String name;
    private String age;
    private Map<String, Object> testMap;
    private List<String> testList;
    private Set<String> testSet;
    private Person person;
    private List<Server> servers;

    @Data
    public static class Person {
        private String phone;
        private String contract;
    }

    @Data
    public static class Server {
        private String ip;
        private int port;
    }
}
